package baseCom.controller;

import baseCom.pojo.Emp;
import baseCom.pojo.Response;
import baseCom.service.EmpService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
public class EmpController {

    @Autowired
    private EmpService empService;

    @RequestMapping("/getAllEmp")
    public Response getAllEmp(@RequestBody String params){
        System.out.println(params);
        // 处理请求参数
        List<Emp> empList = empService.getAllEmp();
        return Response.success(empList);
    }
}
